package shujia.day12.ketang;

public class ExceptionDemo4 {
    public static void main(String[] args) {
        int[] arr = {1,2,3,4};

//        System.out.println(arr[7]);

        try {
            System.out.println(arr[7]); // new ArrayIndexOutOfBoundsException()
        }catch (Exception e){ //Exception e = new ArrayIndexOutOfBoundsException()
//            System.out.println(e.getMessage());
//            System.out.println(e.toString());
            e.printStackTrace();
        }finally {
            System.out.println("好好学习");
        }

        System.out.println("over");
    }
}
